MulticoreResponseTimeMeasurements Sample

Description

This sample program runs a System Response Timer on different cores simultaneously.

Each core has its own timer and its own thread allocation memory to support the timer function. The core thread creates the timer and the necessary resources, and then waits for the main thread to initiate the test with a fast semaphore to synchronize all cores as closely as possible, though the test does not synchronize results.

Source Files

Building the Sample

Build the sample as is. See Usage for additional options.

Running the Sample

Run the sample as is. See Usage for additional options.

Usage

mSrtm | mSrtm [/?] [/h] [/s] [/1] [/f] [c] seconds_to_sample

Options

/h = Display histogram (in addition to summary)

/s = Turn on sound (square wave driven by timer)

/1 = Use a 10 MS timer period (default is 1 MS)

/f = Use fastest available timer (1MS or better)

/c = Use RtGetClockTime to measure

/? = help on usage

If no parameters given, default is mSrtm /h /s /f 15, and timing is done on all RTSS threads

Remarks

The mSRTM program can be built as a Win32 .exe or real-time .rtss executable file.

The mSRTM program differs from the SRTM program in that mSRTM measures the timer periodic interval deviation from the set value, while SRTM measures the timer response latencies including APIC timer drift.

APIs Referenced

RTAPI Windows APIs
RtEnablePortIo

RtGetClockResolution

RtGetClockTimerPeriod

RtGetProcessAffinityMask

RtPrintf

RtAtoi

RtCreateEvent

RtSetThreadPriority

RtSleep

RtSetEvent

RtWaitForSingleObject

RtCloseHandle

SetThreadIdealProcessor

ResumeThread

Sleep